package com.example.backendmanage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.backendmanage.info.UploadFile;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface FileMapper extends BaseMapper<UploadFile> {
    @Insert("insert into sys_file(name,type,size,url,md5) values (#{name},#{type},#{size},#{url},#{md5})")
    int insert(UploadFile file);
    @Select("select * from sys_file where md5=#{md5}")
    UploadFile findByMD5(String md5);
}
